home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / PredatorPrey / ProgWindowRsrcData.h < prev    next >
C/C++ Source or Header  |  1996-06-22  |  2KB  |  47 lines

  1. /* ProgramWindowRsrcData.h -- application-specific data management */
  2. /* Created 940113 1:07 by AppMaker */
  3.  
  4. #ifndef __PWRD__
  5. #define __PWRD__
  6.  
  7. /* Define the creator type and file type for your application. */
  8.  
  9. #define kSignature        'XXXX'
  10. #define kFileType        'TEXT'
  11.  
  12. /* Define any appropriate data structures for your application. */
  13. /* Add any needed fields to Global's WinInfoRec so that each window */
  14. /* can have its own set of data. Your functions will use "cur->" */
  15. /* to access the data. Here, in the interface section, you should */
  16. /* define only those types which are intended to be visible to */
  17. /* modules outside this one. Later, in the implementation section, */
  18. /* you can define additional "private" data structures. */
  19.  
  20. typedef struct {
  21.         short        data;
  22.     } YourStuff;
  23.  
  24. /*----------*/
  25. /* Open, Close, Read, Write, Init, and Dispose are called by the */
  26. /* AppMaker-generated FileM module to do application-specific file accessing. */
  27.  
  28. Boolean    OpenAppFile        (short        vRefNum,
  29.                          Str255        fName,
  30.                          short        *fRefNum);
  31. void    CloseAppFile    (short        fRefNum);
  32. void    ReadAppFile     (short        fRefNum);
  33. void    WriteAppFile    (short        fRefNum);
  34. void    InitAppData        (void);
  35. void    DisposeAppData    (void);
  36.  
  37. /* These functions are for accessing your data as logical chunks. */
  38. /* They are just models for your own accessor functions; */
  39. /* they aren't called by any AppMaker-generated code. */
  40. /* Replace them with whatever is suitable for your application. */
  41.  
  42. void    AddStuff        (YourStuff        *stuff);
  43. void    DeleteStuff        (void);
  44. Boolean    GetStuff        (void);
  45. void    PutStuff        (void);
  46.  
  47. #endif    /*    __PWRD__    */